[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            ismouse - is a mouse installed

  Syntax              boolean ismouse(void);

  Prototype in        mousehk.h

  Remarks             ismouse() detects if a mouse is installed, and if
                      so, how many buttons it has. If a mouse is
                      installed, _mouse1 will contain the returned AX
                      register (is a mouse installed), and _mouse2 will
                      contain the number of buttons on the mouse (BX
                      register), as follows:

                           -1 = 2 buttons
                            3 = Mouse Systems mouse
                            0 = other than 2 buttons

  Return value        returns TRUE if a mouse is installed, FALSE
                      otherwise.

  Note                This function will also reset the mouse if one is
                      installed.

  See also            MGetVerType(), MouseReset()

  Example             #include <mousehk.h>

                      main()
                      {
                           extern int _mouse2;

                           printf("mouse: ");
                           if (ismouse())
                                switch (_mouse2) {
                                     case -1: printf("2 buttons");
                                     case 3: printf("Mouse Systems");
                                     case 0: printf("!= 2 buttons (3?)");
                                }
                           else
                                printf("not installed");
                      }


See Also: MGetVerType() MouseReset()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson